package com.cby.springboot.demo.mapper;

import com.cby.springboot.demo.bean.AdminMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminMenuMapper {

    @Select("select * from admin_menu where id = #{id}")
    AdminMenu findById(@Param("id") int id);

    @Select("select * from admin_menu where parent_id = #{parent_id}")
    List<AdminMenu> findAllByParentId(@Param("parent_id") int parentId);
}
